#ifndef tmControl_h__
#define tmControl_h__

#include "./tmInclude.h"
typedef enum 
{
	MouseDn,
	MouseMv,
	MouseUp
}InputType;
typedef enum
{
	Normal,
	Pressed,
	Dragged,
	Released
}GestureState;
class tmTimer;
class tmControl : public GLES::Object
{
	SetGetProperty(Rect,GLES::RectI,_rect);
public:
	tmControl():_State(Normal){}
	virtual VOID draw(GLES::Painter* painter,GLES::RectI* parent = NULL){};
	virtual VOID onTimer(tmTimer* timer){};
	virtual VOID onInput( int x,int y,InputType type,GLES::RectI* parent = NULL );
	virtual VOID onPressed(int x,int y);
	virtual VOID onDragged(int x,int y);
	virtual VOID onPressRelease(int x,int y);
	virtual VOID onDragRelease(int x,int y);
protected:
	GestureState	_State;
};
#endif // tmControl_h__